@model ContosoUniversity.Models.Course

@{
    ViewData["Title"] = "Create";
}

<h2>Create</h2>

<form asp-action="Create">
    <div class="form-horizontal">
        <h4>Course</h4>
        <hr />
        <div asp-validation-summary="ModelOnly" class="text-danger"></div>
        <div class="form-group">
            <label asp-for="CourseID" class="control-label"></label>
            <input asp-for="CourseID" class="form-control" />
            <span asp-validation-for="CourseID" class="text-danger" />
        </div>
        <div class="form-group">
            <label asp-for="Title" class="control-label"></label>
            <input asp-for="Title" class="form-control" />
            <span asp-validation-for="Title" class="text-danger"></span>
        </div>
        <div class="form-group">
            <label asp-for="Credits" class="control-label"></label>
            <input asp-for="Credits" class="form-control" />
            <span asp-validation-for="Credits" class="text-danger"></span>
        </div>
        <div class="form-group">
            <label asp-for="Department" class="control-label"></label>
            <select asp-for="DepartmentID" class="form-control" asp-items="ViewBag.DepartmentID">
                <option value="">-- Select Department --</option>
            </select>
            <span asp-validation-for="DepartmentID" class="text-danger" />
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Create" class="btn btn-default" />
            </div>
        </div>
    </div>
</form>

<div>
    <a asp-action="Index">Back to List</a>
</div>

@section Scripts {
    @{await Html.RenderPartialAsync("_ValidationScriptsPartial");}
}
